/**
 * Created by zhangsong on 2019/9/22.
 */

//  /application/contractors/v2/{id}
//  /application/staff/v2/{id}

import config from '@/constants/config';

const base = config.baseUrl;

const common = {
  login: `${base}/user/signin`,
  logout: `${base}/user/signout`,
  getArea: `${base}/enums/area`,
  getWorkerType: `${base}/enums/workertype`,
  getgrouplist: `${base}/application/group/lists`,
  creatgrouplist: `${base}/application/group/addGroup`,
};

const application = {
  attachment: {
    url: `${base}/application/attachment`,
  },
  person: {
    forceUpdateSuccess: `${base}/application/person/actions/eface-status/success`,
    registerEface: `${base}/application/person/actions/eface`,
    registerEfaceIc: `${base}/application/staff/icCard/{id}`,
    registerEfaceIcCon: `${base}/application/contractors/icCard/{id}`,
  },
  staffUrl: {
    pdf: `${base}/application/staff/cardList/{id}`,
    list: `${base}/application/staff`,
    newlist: `${base}/application/staff/lists2`,
    save: `${base}/application/staff`,
    getById: `${base}/application/staff/{id}`,
    removeById: `${base}/application/staff/{id}`,
    reviewok: `${base}/application/staff/review/ok/{id}`,
    modifyById: `${base}/application/staff/v2/{id}`,
    approval: `${base}/application/staff/check/ok/{id}`,
    disapproval: `${base}/application/staff/check/notok/{id}`,
    downxlsx: `${base}/application/download/staff`,
    modifyacll: `${base}/application/staff/update/expire`,
  },
  contractorUrl: {
    pdf: `${base}/application/contractors/cardList/{id}`,
    list: `${base}/application/contractors`,
    newlist: `${base}/application/contractors/lists2`,
    save: `${base}/application/contractors`,
    getById: `${base}/application/contractors/{id}`,
    removeById: `${base}/application/contractors/{id}`,
    modifyById: `${base}/application/contractors/v2/{id}`,
    approval: `${base}/application/contractors/check/ok/{id}`,
    disapproval: `${base}/application/contractors/check/notok/{id}`,
    reviewok: `${base}/application/contractors/review/ok/{id}`,
    listSubcontractor: `${base}/application/contractors/subcontractor`,
    downxlsx: `${base}/application/download/contractor`,
    modifyacll: `${base}/application/contractors/update/expire`,
    getMainContractor: `${base}/main/contractor`,
    createMainContractor: `${base}/main/contractor`,
    permissions: `${base}/application/contractors/lists/subcontract`,
    sendemail: `${base}/application/contractors/mail`,
    defaultdata: `${base}/application/contractors/autoAdd/{id}`,
  },
  temporaryUrl: {
    pdf: `${base}/application/contractors/cardList/{id}`,
    list: `${base}/application/temp`,
    newlist: `${base}/application/temp`,
    save: `${base}/application/temp`,
    getById: `${base}/application/temp/detail/{id}`,
    removeById: `${base}/application/temp/{id}`,
    outById: `${base}/application/temp/cancellation/{id}`,
    modifyById: `${base}/application/temp/{id}`,
    approval: `${base}/application/temp/checkOk/{id}`,
    disapproval: `${base}/application/temp/checkNot/{id}`,
    listSubcontractor: `${base}/application/contractors/subcontractor`,
    downxlsx: `${base}/application/download/contractor`,
    modifyacll: `${base}/application/contractors/update/expire`,
    getMainContractor: `${base}/main/contractor`,
    createMainContractor: `${base}/main/contractor`,
    getloction: `${base}/temp/location`,
    creatlocation: `${base}/temp/location`,
    permissions: `${base}/application/temp/subcontract`,
  },
  vehiclesUrl: {
    list: `${base}/application/vehicles`,
    save: `${base}/application/vehicles`,
    getById: `${base}/application/vehicles/{id}`,
    removeById: `${base}/application/vehicles/{id}`,
    modifyById: `${base}/application/vehicles/{id}`,
  },
  vaccineUrl: {
    add: `${base}/application/vaccination/add`,
    get: `${base}/application/vaccination/{id}`,
    modify: `${base}/application/vaccination/update`,
    upload: `${base}/operate`,
    download: `${base}/operate/download`,
  },
  alarm: {
    list: `${base}/person/alert`,
    modifyState: `${base}/person/alert`,
    // downxlsx: `${base}/application/download/alert`,
    downxlsx: `${base}/person/alert/download`,
  },
  creatselete: {
    modifycontractor: `${base}/main/contractor/{id}`,
    detelecontractor: `${base}/main/contractor/{id}`,
    modifylocation: `${base}/temp/location/{id}`,
    detelelocation: `${base}/temp/location/{id}`,
    modifygroup: `${base}/application/group/{id}`,
    detelegroup: `${base}/application/group/{id}`,
  },
};

export default {
  application,
  common,
};
